import request from '@/utils/request'

// 查询会员充值套餐列表
export function listRechargePackage(query) {
  return request({
    url: '/member/rechargePackage/list',
    method: 'get',
    params: query
  })
}

export function listAllEnabledRechargePackage() {
  return request({
    url: '/member/rechargePackage/listAllEnabled',
    method: 'get'
  })
}

// 查询会员充值套餐详细
export function getRechargePackage(id) {
  return request({
    url: '/member/rechargePackage/' + id,
    method: 'get'
  })
}

// 新增会员充值套餐
export function addRechargePackage(data) {
  return request({
    url: '/member/rechargePackage',
    method: 'post',
    data: data
  })
}

// 修改会员充值套餐
export function updateRechargePackage(data) {
  return request({
    url: '/member/rechargePackage',
    method: 'put',
    data: data
  })
}

// 删除会员充值套餐
export function delRechargePackage(id) {
  return request({
    url: '/member/rechargePackage/' + id,
    method: 'delete'
  })
}

// 导出会员充值套餐
export function exportRechargePackage(query) {
  return request({
    url: '/member/rechargePackage/export',
    method: 'get',
    params: query
  })
}